package v1;

import javax.swing.*;

/**
 * @Description: 坦克大战游戏入口程序（窗口）
 * @CreateTime: 2024-01-25  14:45
 * @Author: JAMILA
 * @Version: 1.0
 */

public class TankBattleGame extends JFrame {
    MyPanel mp = null;

    public static void main(String[] args) {

        TankBattleGame tankBattleGame = new TankBattleGame();

    }

    public TankBattleGame() {
        mp = new MyPanel();
        this.add(mp);
        //让JFrame监听画板的键盘事件
        this.addKeyListener(mp);
        this.setSize(1000, 750);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setVisible(true);

    }

}
